#pragma once

#include "BaseProjectile.h"
#include "BaseMissile.h"
#include <Ogre.h>

using namespace Ogre;

class ProjectileManager : public Singleton<ProjectileManager>
{
public:
	ProjectileManager(Ogre::SceneManager* sceneManager);
	~ProjectileManager();
    
    static ProjectileManager& getSingleton(void);
    static ProjectileManager* getSingletonPtr(void);

	void addBaseProjectile();
	void addBaseProjectileFromCache(Ogre::Vector3 pPos, Quaternion pOrientation);
	void updateProjectiles(double timeSinceLastFrame);

	void addBaseMissile();
	void addBaseMissileFromCache(Ogre::Vector3 pPos, Quaternion pOrientation, Vector3 target);
	void updateMissiles(double timeSinceLastFrame);
private:

	std::vector<BaseProjectile*>	m_BaseProjectiles;
	std::vector<BaseMissile*>		m_BaseMissiles;
	int								m_CurrentProjectile;
	int								m_MaxProjectiles;

	int								m_CurrentMissile;
	int								m_MaxMissiles;

	Ogre::SceneManager* sceneMgr;
};

